Optimal. Leaf size=209 \[ \frac {\sqrt {\pi } \exp \left (-\left ((-\log (f)+i) \left (a-\frac {b^2 (-\log (f)+i)}{-4 c \log (f)+4 i e}\right )\right )\right ) \text {erf}\left (\frac {b (-\log (f)+i)+2 x (-c \log (f)+i e)}{2 \sqrt {-c \log (f)+i e}}\right )}{4 \sqrt {-c \log (f)+i e}}+\frac {\sqrt {\pi } \exp \left ((\log (f)+i) \left (a-\frac {b^2 (\log (f)+i)}{4 c \log (f)+4 i e}\right )\right ) \text {erfi}\left (\frac {b (\log (f)+i)+2 x (c \log (f)+i e)}{2 \sqrt {c \log (f)+i e}}\right )}{4 \sqrt {c \log (f)+i e}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.48, antiderivative size = 209, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {4473, 2287, 2234, 2205, 2204} \[ \frac {\sqrt {\pi } \exp \left (-(-\log (f)+i) \left (a-\frac {b^2 (-\log (f)+i)}{-4 c \log (f)+4 i e}\right )\right ) \text {Erf}\left (\frac {b (-\log (f)+i)+2 x (-c \log (f)+i e)}{2 \sqrt {-c \log (f)+i e}}\right )}{4 \sqrt {-c \log (f)+i e}}+\frac {\sqrt {\pi } \exp \left ((\log (f)+i) \left (a-\frac {b^2 (\log (f)+i)}{4 c \log (f)+4 i e}\right )\right ) \text {Erfi}\left (\frac {b (\log (f)+i)+2 x (c \log (f)+i e)}{2 \sqrt {c \log (f)+i e}}\right )}{4 \sqrt {c \log (f)+i e}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2204
Rule 2205
Rule 2234
Rule 2287
Rule 4473
Rubi steps
\begin {align*} \int f^{a+b x+c x^2} \cos \left (a+b x+e x^2\right ) \, dx &=\int \left (\frac {1}{2} e^{-i a-i b x-i e x^2} f^{a+b x+c x^2}+\frac {1}{2} e^{i a+i b x+i e x^2} f^{a+b x+c x^2}\right ) \, dx\\ &=\frac {1}{2} \int e^{-i a-i b x-i e x^2} f^{a+b x+c x^2} \, dx+\frac {1}{2} \int e^{i a+i b x+i e x^2} f^{a+b x+c x^2} \, dx\\ &=\frac {1}{2} \int \exp \left (-a (i-\log (f))-b x (i-\log (f))-x^2 (i e-c \log (f))\right ) \, dx+\frac {1}{2} \int \exp \left (a (i+\log (f))+b x (i+\log (f))+x^2 (i e+c \log (f))\right ) \, dx\\ &=\frac {1}{2} \exp \left (-(i-\log (f)) \left (a-\frac {b^2 (i-\log (f))}{4 i e-4 c \log (f)}\right )\right ) \int \exp \left (\frac {(-b (i-\log (f))+2 x (-i e+c \log (f)))^2}{4 (-i e+c \log (f))}\right ) \, dx+\frac {1}{2} \exp \left ((i+\log (f)) \left (a-\frac {b^2 (i+\log (f))}{4 i e+4 c \log (f)}\right )\right ) \int \exp \left (\frac {(b (i+\log (f))+2 x (i e+c \log (f)))^2}{4 (i e+c \log (f))}\right ) \, dx\\ &=\frac {\exp \left (-(i-\log (f)) \left (a-\frac {b^2 (i-\log (f))}{4 i e-4 c \log (f)}\right )\right ) \sqrt {\pi } \text {erf}\left (\frac {b (i-\log (f))+2 x (i e-c \log (f))}{2 \sqrt {i e-c \log (f)}}\right )}{4 \sqrt {i e-c \log (f)}}+\frac {\exp \left ((i+\log (f)) \left (a-\frac {b^2 (i+\log (f))}{4 i e+4 c \log (f)}\right )\right ) \sqrt {\pi } \text {erfi}\left (\frac {b (i+\log (f))+2 x (i e+c \log (f))}{2 \sqrt {i e+c \log (f)}}\right )}{4 \sqrt {i e+c \log (f)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.81, size = 325, normalized size = 1.56 \[ -\frac {i \sqrt {\pi } e^{-\frac {b^2 c \log ^3(f)}{2 \left (c^2 \log ^2(f)+e^2\right )}} f^{a-\frac {b^2}{2 (e-i c \log (f))}} \left ((\cos (a)+i \sin (a)) (e+i c \log (f)) \sqrt {c \log (f)+i e} \exp \left (\frac {1}{4} b^2 \left (\frac {\log ^2(f)}{c \log (f)-i e}+\frac {1}{c \log (f)+i e}\right )\right ) \text {erfi}\left (\frac {\log (f) (b+2 c x)+i (b+2 e x)}{2 \sqrt {c \log (f)+i e}}\right )-(\cos (a)-i \sin (a)) (e-i c \log (f)) \sqrt {c \log (f)-i e} f^{\frac {i b^2 c \log (f)}{c^2 \log ^2(f)+e^2}} \exp \left (\frac {1}{4} b^2 \left (\frac {\log ^2(f)}{c \log (f)+i e}+\frac {1}{c \log (f)-i e}\right )\right ) \text {erfi}\left (\frac {\log (f) (b+2 c x)-i (b+2 e x)}{2 \sqrt {c \log (f)-i e}}\right )\right )}{4 \left (c^2 \log ^2(f)+e^2\right )} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 2.13, size = 381, normalized size = 1.82 \[ -\frac {\sqrt {\pi } {\left (c \log \relax (f) - i \, e\right )} \sqrt {-c \log \relax (f) - i \, e} \operatorname {erf}\left (\frac {{\left (2 \, e^{2} x + {\left (2 \, c^{2} x + b c\right )} \log \relax (f)^{2} + b e + {\left (i \, b c - i \, b e\right )} \log \relax (f)\right )} \sqrt {-c \log \relax (f) - i \, e}}{2 \, {\left (c^{2} \log \relax (f)^{2} + e^{2}\right )}}\right ) e^{\left (-\frac {{\left (b^{2} c - 4 \, a c^{2}\right )} \log \relax (f)^{3} + i \, b^{2} e - 4 i \, a e^{2} - {\left (-2 i \, b^{2} c + 4 i \, a c^{2} + i \, b^{2} e\right )} \log \relax (f)^{2} - {\left (b^{2} c - 2 \, b^{2} e + 4 \, a e^{2}\right )} \log \relax (f)}{4 \, {\left (c^{2} \log \relax (f)^{2} + e^{2}\right )}}\right )} + \sqrt {\pi } {\left (c \log \relax (f) + i \, e\right )} \sqrt {-c \log \relax (f) + i \, e} \operatorname {erf}\left (\frac {{\left (2 \, e^{2} x + {\left (2 \, c^{2} x + b c\right )} \log \relax (f)^{2} + b e + {\left (-i \, b c + i \, b e\right )} \log \relax (f)\right )} \sqrt {-c \log \relax (f) + i \, e}}{2 \, {\left (c^{2} \log \relax (f)^{2} + e^{2}\right )}}\right ) e^{\left (-\frac {{\left (b^{2} c - 4 \, a c^{2}\right )} \log \relax (f)^{3} - i \, b^{2} e + 4 i \, a e^{2} - {\left (2 i \, b^{2} c - 4 i \, a c^{2} - i \, b^{2} e\right )} \log \relax (f)^{2} - {\left (b^{2} c - 2 \, b^{2} e + 4 \, a e^{2}\right )} \log \relax (f)}{4 \, {\left (c^{2} \log \relax (f)^{2} + e^{2}\right )}}\right )}}{4 \, {\left (c^{2} \log \relax (f)^{2} + e^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int f^{c x^{2} + b x + a} \cos \left (e x^{2} + b x + a\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.20, size = 215, normalized size = 1.03 \[ -\frac {\sqrt {\pi }\, f^{a} {\mathrm e}^{-\frac {4 a e -b^{2}+4 i \ln \relax (f ) a c -2 i \ln \relax (f ) b^{2}+\ln \relax (f )^{2} b^{2}}{4 \left (-i e +c \ln \relax (f )\right )}} \erf \left (-\sqrt {i e -c \ln \relax (f )}\, x +\frac {-i b +b \ln \relax (f )}{2 \sqrt {i e -c \ln \relax (f )}}\right )}{4 \sqrt {i e -c \ln \relax (f )}}-\frac {\sqrt {\pi }\, f^{a} {\mathrm e}^{\frac {-4 a e +b^{2}+4 i \ln \relax (f ) a c -2 i \ln \relax (f ) b^{2}-\ln \relax (f )^{2} b^{2}}{4 i e +4 c \ln \relax (f )}} \erf \left (-\sqrt {-i e -c \ln \relax (f )}\, x +\frac {i b +b \ln \relax (f )}{2 \sqrt {-i e -c \ln \relax (f )}}\right )}{4 \sqrt {-i e -c \ln \relax (f )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.39, size = 1018, normalized size = 4.87 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int f^{c\,x^2+b\,x+a}\,\cos \left (e\,x^2+b\,x+a\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int f^{a + b x + c x^{2}} \cos {\left (a + b x + e x^{2} \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________